package com.zyf.chapter02.behavior.chain.framework.spring;

/**
 * 处理器类，只需关心执行即可
 * 仿照 spring 的拦截器
 * @author yifeng
 */
public class HandlerA implements IHandler {

    @Override
    public boolean preHandler() {
        System.out.println("handlerA 前置执行");
        return true;
    }

    @Override
    public void postHandler(boolean result) {
        System.out.println("handlerA 后置执行");
    }

    @Override
    public void triggerAfterCompletion() {
        System.out.println("handlerA：triggerAfterCompletion");
    }
}
